﻿<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>会员系统</title>
<meta name="description" content="会员商务系统">
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
 
 
<link rel="stylesheet" href="/static/css/login.css" type="text/css" />
<link rel="stylesheet" href="/static/css/control.css" type="text/css" />
<link rel="stylesheet" href="/static/css/font-awesome.min.css" type="text/css" />
<script type="text/javascript" src="/static/js/function.js" >
</script>
<script type="text/javascript" src="/static/js/jquery.js" ></script><script type="text/javascript" src="/static/js/utils.js" ></script><script type="text/javascript" src="/static/js/jquery.form.js" ></script><script type="text/javascript" src="/static/js/listtable.js" ></script><script type="text/javascript" src="/static/js/control.js" ></script>
<script type="text/javascript" src="/static/js/login.js" ></script>
    <script type="text/javascript" src="/static/js/jquery.js" >
    </script>
</head>
<body>
     <img src="/static/picture/bg.jpg" style=" position:fixed; z-index:-1; top:0; left:0; width:100%; height:100%;" />

<div class="w">
  <div class="loginwarp">


      <dl class="loginbox">

         <div class="logobox"><div class="logo"><img src="/static/picture/logo.jpg"></div></div>

 <dt>会员登录</dt>
  <form>
 <dd class="sb">
  <i class="fa fa-user"></i>
  <input type="email" placeholder="请输入您的注册邮箱" name="username"  class="login_txtbx" required/>
 </dd>
 <dd class="sb">
 <i class="fa fa-lock"></i>
  <input type="password" placeholder="请输入登录密码" name="password"  class="login_txtbx" required/>
 </dd>
 <dd class="sb">
  <i class="fa fa-check-circle"></i>
  <div class="checkcode">
  <input type="text" name="captcha"  value=""  size='4' class='login_txtbx' placeholder='请输入验证码'/>
      <div class="codeimg" onclick="this.src=this.src+'?'"><img id="captcha_img" src="{:captcha_src()}"  onclick="refreshVerify()"/></div>
  </div>
 </dd>
  <input type="hidden" id="yzm" value="0"/>
 <dd>
<input type="button" name="submit" id="submit" value="立即登录" class='submit_btn'> </dd>
 </form>
<!-- <dd>
    <div class="bottom"><a href="/index.php?mod=member&act=forgotpassword">忘记密码</a></div>
 </dd>-->

</dl>


   </div>

 </div>

<script>
    $(function () {
        $("#submit").click(function () {
            var username=$("input[name='username']").val();
            var password=$("input[name='password']").val();
            var captcha=$("input[name='captcha']").val();

            $.post("/index/index/loginCheck",{
                username:username,
                password:password,
                captcha:captcha
            },function(result){
                if(result==200){
                    window.location.href = "/";
                }else {
                    alert(result);
                }

            });
        })
    });
    function refreshVerify() {

        var ts=Date.parse(new Date())/1000;
        console.log(ts);
        $('#captcha_img').attr('src','/captcha?rand='+ts);
    }
</script>
 
</body>
</html>

